File src/dinoex_jobs.c

* by Dirk Meyer (dinoex) * Copyright (C) 2004-2011 Dirk Meyer * * By using this file, you agree to the terms and conditions set * forth in the GNU General Public License. More information is * available in the LICENSE file. * * If you received this file without documentation, it can be * downloaded from http://iroffer.dinoex.net/ * * $Id: dinoex_jobs.c,v 1.191 2012/03/16 20:49:37 cvs Exp $ *


Included Files

include the headers


Preprocessor definitions

#define _LONGLONG 1

Typedef xml_buffer_t

typedef struct {...} xml_buffer_t
struct  
   {  
      const char* filename;  
      char buffer[8192];  
      size_t len;  
      int fd;  
      int dummy;  
   }  

Typedef magic_crc_t

typedef struct {...} magic_crc_t
struct  
   {  
      size_t offset;  
      size_t len;  
      unsigned char magic[8];  
   }  

Typedef u_uint32_bytes_t

typedef union {...} u_uint32_bytes_t
union  
   {  
      ir_uint32 i;  
      unsigned char b[4];  
   }  

Local Variables

FISH64
NOTRANSLATE

static const unsigned char FISH64[]

Used in: encrypt_fish()  
  init_fish64decode()  

fish64decode
static unsigned char fish64decode[256]

Used in: base64_to_long()  
  init_fish64decode()  

last_look_for_file_remove
static unsigned int last_look_for_file_remove

Used in: look_for_file_remove()  

badcrc
NOTRANSLATE

static const char* badcrc

Used in: validate_crc32()  

r_local_vhost
static char* r_local_vhost

Used in: a_rehash_cleanup()  
  a_rehash_needtojump()  
  a_rehash_prepare()  

r_config_nick
static char* r_config_nick

Used in: a_rehash_cleanup()  
  a_rehash_prepare()  

magic_crc_table
static magic_crc_t magic_crc_table[]

Used in: get_zip_crc32_buffer()  

Global Function a_fillwith_msg2()

void a_fillwith_msg2 ( userinput* const u, const char* nick, const char* line )
Prototyped in: src/dinoex_jobs.h
Calls: a_parse_inputline() src/dinoex_admin.c
  mystrdup2() src/dinoex_utilities.c
  updatecontext_f() src/iroffer_utilities.c
Called by: a_fillwith_plist() src/dinoex_jobs.c
  a_make_announce() src/dinoex_admin.c
  admin_line() src/dinoex_jobs.c
  admin_msg_line() src/dinoex_user.c
  autoadd_scan() src/dinoex_jobs.c
  cie_command() src/dinoex_ruby.c
  mainloop() src/iroffer_main.c
  send_xdcc_info() src/dinoex_user.c
  sendxdlqueue() src/iroffer_misc.c
  xdccsavetext() src/iroffer_misc.c
References Variables: gnetwork src/dinoex_main.c

Global Function a_fillwith_plist()

void a_fillwith_plist ( userinput* manplist, const char* name, channel_t* ch )
Prototyped in: src/dinoex_jobs.h
Calls: a_fillwith_msg2() src/dinoex_jobs.c
  mydelete2() src/iroffer_utilities.c
  mymalloc2() src/iroffer_utilities.c
  snprintf()
Called by: mainloop() src/iroffer_main.c
  u_psend() src/iroffer_admin.c
References Variables: gdata src/dinoex_main.c

Global Function a_quit_network()

void a_quit_network ( void )
Prototyped in: src/dinoex_jobs.h
Calls: clearmemberlist() src/iroffer_utilities.c
  free_channel_data() src/dinoex_misc.c
  irlist_delete() src/iroffer_utilities.c
  irlist_get_head() src/iroffer_utilities.c
  mydelete2() src/iroffer_utilities.c
  quit_server() src/iroffer_misc.c
Called by: a_offline_net() src/dinoex_admin.c
  a_rehash_needtojump() src/dinoex_jobs.c
References Variables: gnetwork src/dinoex_main.c

Global Function a_read_config_files()

void a_read_config_files ( const userinput* u )
Prototyped in: src/dinoex_jobs.h
Calls: a_respond() src/dinoex_admin.c
  admin_clean_input() src/dinoex_jobs.c
  getconfig_set() src/dinoex_config.c
  mydelete2() src/iroffer_utilities.c
  mymalloc2() src/iroffer_utilities.c
  outerror() src/iroffer_utilities.c
  updatecontext_f() src/iroffer_utilities.c
  __error(), fclose(), fgets(), fopen(), printf(), stat(), strerror()
Called by: getconfig() src/iroffer_misc.c
  u_rehash() src/iroffer_admin.c
References Functions: feof()
References Variables: current_bracket src/dinoex_config.c
  current_config src/dinoex_config.c
  current_line src/dinoex_config.c
  current_network src/dinoex_config.c
  gdata src/dinoex_main.c

Global Function a_rehash_channels()

void a_rehash_channels ( void )
Prototyped in: src/dinoex_jobs.h
Calls: clearmemberlist() src/iroffer_utilities.c
  free_channel_data() src/dinoex_misc.c
  ioutput() src/iroffer_utilities.c
  irlist_delete() src/iroffer_utilities.c
  irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
  irlist_move() src/dinoex_jobs.c
  joinchannel() src/iroffer_misc.c
  writeserver() src/iroffer_misc.c
  strcmp()
Called by: u_rehash() src/iroffer_admin.c
References Variables: gdata src/dinoex_main.c
  gnetwork src/dinoex_main.c

Global Function a_rehash_cleanup()

void a_rehash_cleanup ( const userinput* u )
Prototyped in: src/dinoex_jobs.h
Calls: a_respond() src/dinoex_admin.c
  get_config_nick() src/dinoex_irc.c
  mydelete2() src/iroffer_utilities.c
  mystrdup2() src/dinoex_utilities.c
  updatecontext_f() src/iroffer_utilities.c
  write_files() src/dinoex_jobs.c
  writeserver() src/iroffer_misc.c
  strcmp()
Called by: u_rehash() src/iroffer_admin.c
References Variables: gdata src/dinoex_main.c
  gnetwork src/dinoex_main.c
  r_config_nick src/dinoex_jobs.c
  r_local_vhost src/dinoex_jobs.c

Global Function a_rehash_jump()

void a_rehash_jump ( void )
Prototyped in: src/dinoex_jobs.h
Calls: switchserver() src/iroffer_misc.c
  updatecontext_f() src/iroffer_utilities.c
Called by: u_rehash() src/iroffer_admin.c
References Variables: gdata src/dinoex_main.c
  gnetwork src/dinoex_main.c

Global Function a_rehash_needtojump()

void a_rehash_needtojump ( const userinput* u )
Prototyped in: src/dinoex_jobs.h
Calls: a_quit_network() src/dinoex_jobs.c
  a_respond() src/dinoex_admin.c
  get_local_vhost() src/dinoex_irc.c
  mydelete2() src/iroffer_utilities.c
  strcmp_null() src/dinoex_utilities.c
  updatecontext_f() src/iroffer_utilities.c
Called by: u_rehash() src/iroffer_admin.c
References Variables: gdata src/dinoex_main.c
  gnetwork src/dinoex_main.c
  r_local_vhost src/dinoex_jobs.c

Global Function a_rehash_prepare()

void a_rehash_prepare ( void )
Prototyped in: src/dinoex_jobs.h
Calls: irlist_move() src/dinoex_jobs.c
  mystrdup2() src/dinoex_utilities.c
Called by: u_rehash() src/iroffer_admin.c
References Variables: gdata src/dinoex_main.c
  r_config_nick src/dinoex_jobs.c
  r_local_vhost src/dinoex_jobs.c

Global Function admin_jobs()

void admin_jobs ( void )
Prototyped in: src/dinoex_jobs.h
Calls: admin_clean_input() src/dinoex_jobs.c
  irlist_add_string() src/dinoex_utilities.c
  mydelete2() src/iroffer_utilities.c
  mymalloc2() src/iroffer_utilities.c
  fclose(), fgets(), fopen(), unlink()
Called by: mainloop() src/iroffer_main.c
References Functions: feof()
References Variables: gdata src/dinoex_main.c

Global Function autoadd_all()

void autoadd_all ( void )
Prototyped in: src/dinoex_jobs.h
Calls: autoadd_scan() src/dinoex_jobs.c
  irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
  updatecontext_f() src/iroffer_utilities.c
Called by: a_autoadd() src/dinoex_admin.c
  mainloop() src/iroffer_main.c
References Variables: gdata src/dinoex_main.c

Global Function autotrigger_add()

void autotrigger_add ( xdcc* xd )
Prototyped in: src/dinoex_jobs.h
Calls: irlist_add2() src/iroffer_utilities.c
Called by: a_chtrigger() src/dinoex_admin.c
  autotrigger_rebuild() src/dinoex_jobs.c
References Variables: gdata src/dinoex_main.c

Global Function autotrigger_rebuild()

void autotrigger_rebuild ( void )
Prototyped in: src/dinoex_jobs.h
Calls: autotrigger_add() src/dinoex_jobs.c
  irlist_delete_all() src/iroffer_utilities.c
  irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
Called by: a_chtrigger() src/dinoex_admin.c
  a_deltrigger() src/dinoex_admin.c
  a_remove_pack_final() src/dinoex_admin.c
  startupiroffer() src/iroffer_misc.c
References Variables: gdata src/dinoex_main.c

Global Function backup_statefile()

void backup_statefile ( void )
Prototyped in: src/dinoex_jobs.h
Calls: getdatestr() src/iroffer_utilities.c
  mydelete2() src/iroffer_utilities.c
  mymalloc2() src/iroffer_utilities.c
  mystrjoin2() src/dinoex_utilities.c
  outerror() src/iroffer_utilities.c
  __error(), rename(), strerror()
Called by: a_cleargets() src/dinoex_admin.c
  read_statefile() src/iroffer_statefile.c
  u_clearrecords() src/iroffer_admin.c
References Variables: gdata src/dinoex_main.c

Global Function cancel_md5_hash()

void cancel_md5_hash ( xdcc* xd, const char* msg )
Prototyped in: src/dinoex_jobs.h
Calls: event_close() src/dinoex_kqueue.c
  irlist_size() src/iroffer_utilities.c
  number_of_pack() src/dinoex_misc.c
  outerror() src/iroffer_utilities.c
  __assert(), memset()
Called by: a_chfile_sub() src/dinoex_admin.c
  a_remove_pack2() src/dinoex_admin.c
  look_for_file_changes() src/iroffer_misc.c
References Variables: gdata src/dinoex_main.c

Global Function clean_send_buffers()

void clean_send_buffers ( void )
Prototyped in: src/dinoex_jobs.h
Calls: cleanannounce() src/dinoex_jobs.c
  irlist_delete_all() src/iroffer_utilities.c
Called by: a_servqc2() src/dinoex_admin.c
  ir_parseline2() src/dinoex_irc.c
  quit_server() src/iroffer_misc.c
  shutdowniroffer() src/iroffer_misc.c
References Variables: gnetwork src/dinoex_main.c

Global Function close_qupload()

int close_qupload ( unsigned int net, const char* nick )
Prototyped in: src/dinoex_jobs.h
Calls: irlist_delete() src/iroffer_utilities.c
  irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
  mydelete2() src/iroffer_utilities.c
  start_qupload() src/dinoex_jobs.c
  updatecontext_f() src/iroffer_utilities.c
  strcasecmp()
Called by: a_get() src/dinoex_admin.c
  l_perform() src/dinoex_upload.c
References Variables: gdata src/dinoex_main.c

Global Function complete_md5_hash()

void complete_md5_hash ( void )
Prototyped in: src/dinoex_jobs.h
Calls: MD5Final() src/plumb_md5.c
  crc32_final() src/dinoex_jobs.c
  event_close() src/dinoex_kqueue.c
  ioutput() src/iroffer_utilities.c
  number_of_pack() src/dinoex_misc.c
  validate_crc32() src/dinoex_jobs.c
Called by: mainloop() src/iroffer_main.c
References Variables: gdata src/dinoex_main.c

Global Function crc32_update()

void crc32_update ( char* buf, size_t len )
Prototyped in: src/dinoex_jobs.h
Called by: mainloop() src/iroffer_main.c
References Variables: crctable src/crc32.c
  gdata src/dinoex_main.c

Global Function delayed_announce()

delayed_announce

void delayed_announce ( void )

Prototyped in: src/dinoex_jobs.h
Calls: a_autoaddann() src/dinoex_admin.c
  irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
  irlist_size() src/iroffer_utilities.c
Called by: mainloop() src/iroffer_main.c
References Variables: gdata src/dinoex_main.c

Global Function expire_logfiles()

expire old logfiles

void expire_logfiles ( const char* logfile )

Prototyped in: src/dinoex_jobs.h
Calls: ioutput() src/iroffer_utilities.c
  mydelete2() src/iroffer_utilities.c
  mystrdup2() src/dinoex_utilities.c
  mystrjoin2() src/dinoex_utilities.c
  outerror() src/iroffer_utilities.c
  readdir_sub() src/dinoex_jobs.c
  updatecontext_f() src/iroffer_utilities.c
  __error(), closedir(), opendir(), stat(), strcmp(), strerror(), strlen(), strncmp(), strrchr(), unlink()
Called by: isrotatelog() src/iroffer_misc.c
  rotatelog() src/dinoex_jobs.c
References Variables: gdata src/dinoex_main.c

Global Function find_groupdesc()

const char* find_groupdesc ( const char* group )
Prototyped in: src/dinoex_jobs.h
Calls: irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
  strcasecmp()
Called by: cie_info_pack() src/dinoex_ruby.c
  write_removed_xdcc() src/dinoex_jobs.c
References Variables: gdata src/dinoex_main.c

Global Function get_zip_crc32_pack()

check for CRC32 in compressed pack

ir_uint32 get_zip_crc32_pack ( xdcc* xd )

Prototyped in: src/dinoex_jobs.h
Calls: a_open_file() src/dinoex_admin.c
  get_zip_crc32_buffer() src/dinoex_jobs.c
  mydelete2() src/iroffer_utilities.c
  mymalloc2() src/iroffer_utilities.c
  mystrdup2() src/dinoex_utilities.c
  updatecontext_f() src/iroffer_utilities.c
  close(), read()
Called by: u_info() src/iroffer_admin.c

Global Function import_xdccfile()

unsigned int import_xdccfile ( void )
Prototyped in: src/dinoex_jobs.h
Calls: admin_clean_input() src/dinoex_jobs.c
  atoull() src/iroffer_utilities.c
  import_pack() src/dinoex_jobs.c
  mydelete2() src/iroffer_utilities.c
  mymalloc2() src/iroffer_utilities.c
  mystrdup2() src/dinoex_utilities.c
  outerror() src/iroffer_utilities.c
  updatecontext_f() src/iroffer_utilities.c
  __error(), atof(), atoi(), atol(), fclose(), fgets(), fopen(), strcmp(), strerror(), strtok()
Called by: startupiroffer() src/iroffer_misc.c
References Functions: feof()
References Variables: gdata src/dinoex_main.c

Global Function init_fish64decode()

void init_fish64decode ( void )
Prototyped in: src/dinoex_jobs.h
Calls: memset()
Called by: startup_dinoex() src/dinoex_misc.c
References Variables: FISH64 src/dinoex_jobs.c
  fish64decode src/dinoex_jobs.c

Global Function lag_message()

void lag_message ( void )
Prototyped in: src/dinoex_jobs.h
Calls: a_respond() src/dinoex_admin.c
  mydelete2() src/iroffer_utilities.c
  mymalloc2() src/iroffer_utilities.c
Called by: ir_parseline2() src/dinoex_irc.c
References Variables: gdata src/dinoex_main.c
  gnetwork src/dinoex_main.c

Global Function look_for_file_remove()

void look_for_file_remove ( void )
Prototyped in: src/dinoex_jobs.h
Calls: check_for_file_remove() src/dinoex_jobs.c
  irlist_size() src/iroffer_utilities.c
  updatecontext_f() src/iroffer_utilities.c
Called by: mainloop() src/iroffer_main.c
References Variables: gdata src/dinoex_main.c
  last_look_for_file_remove src/dinoex_jobs.c

Global Function new_logfilename()

get the new filename for a logfile

char* new_logfilename ( const char* logfile )

Prototyped in: src/dinoex_jobs.h
Calls: mymalloc2() src/iroffer_utilities.c
  updatecontext_f() src/iroffer_utilities.c
  localtime(), snprintf(), strlen()
Called by: isrotatelog() src/iroffer_misc.c
  rotatelog() src/dinoex_jobs.c
References Variables: gdata src/dinoex_main.c

Global Function privmsg_chan()

void privmsg_chan ( const channel_t* ch, const char* format, ... )
Prototyped in: src/dinoex_jobs.h
Calls: vprivmsg_chan() src/dinoex_jobs.c
  __builtin_va_end(), __builtin_va_start()
Called by: a_announce_channels() src/dinoex_admin.c
  a_msg_nick_or_chan() src/dinoex_admin.c
  cie_privmsg() src/dinoex_ruby.c

Global Function rename_with_backup()

void rename_with_backup ( const char* filename, const char* backup, const char* temp, const char* msg )
Prototyped in: src/dinoex_jobs.h
Calls: outerror() src/iroffer_utilities.c
  __error(), link(), rename(), strerror(), unlink()
Called by: xdcc_save_xml() src/dinoex_jobs.c
  xdccsavetext() src/iroffer_misc.c

Global Function reset_download_limits()

void reset_download_limits ( void )
Prototyped in: src/dinoex_jobs.h
Calls: ioutput() src/iroffer_utilities.c
  irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
Called by: mainloop() src/iroffer_main.c
References Variables: gdata src/dinoex_main.c

Global Function rotatelog()

rotae logfile

int rotatelog ( const char* logfile )

Prototyped in: src/dinoex_jobs.h
Calls: expire_logfiles() src/dinoex_jobs.c
  mydelete2() src/iroffer_utilities.c
  mylog() src/iroffer_utilities.c
  new_logfilename() src/dinoex_jobs.c
  updatecontext_f() src/iroffer_utilities.c
  __error(), rename(), strerror()
Called by: isrotatelog() src/iroffer_misc.c

Global Function run_delayed_jobs()

void run_delayed_jobs ( void )
Prototyped in: src/dinoex_jobs.h
Calls: a_add_delayed() src/dinoex_admin.c
  a_addgroup() src/dinoex_admin.c
  a_addnew() src/dinoex_admin.c
  a_remove_delayed() src/dinoex_admin.c
  admin_run() src/dinoex_jobs.c
  free_userinput() src/dinoex_misc.c
  irlist_delete() src/iroffer_utilities.c
  irlist_get_head() src/iroffer_utilities.c
  mydelete2() src/iroffer_utilities.c
  outerror() src/iroffer_utilities.c
  strcmp()
Called by: mainloop() src/iroffer_main.c
References Variables: gdata src/dinoex_main.c

Global Function save_unlink()

int save_unlink ( const char* path )
Prototyped in: src/dinoex_jobs.h
Calls: file_not_exits() src/dinoex_jobs.c
  getfilename() src/dinoex_utilities.c
  mydelete2() src/iroffer_utilities.c
  mymalloc2() src/iroffer_utilities.c
  save_unlink_failed() src/dinoex_jobs.c
  rename(), snprintf(), strlen(), unlink()
Called by: a_filedel_disk() src/dinoex_admin.c
  a_rmul() src/dinoex_admin.c
References Variables: gdata src/dinoex_main.c

Global Function send_periodicmsg()

void send_periodicmsg ( void )
Prototyped in: src/dinoex_jobs.h
Calls: irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
  privmsg() src/iroffer_utilities.c
  updatecontext_f() src/iroffer_utilities.c
Called by: mainloop() src/iroffer_main.c
References Variables: gdata src/dinoex_main.c
  gnetwork src/dinoex_main.c

Global Function sendannounce()

void sendannounce ( void )
Prototyped in: src/dinoex_jobs.h
Calls: irlist_delete() src/iroffer_utilities.c
  irlist_get_head() src/iroffer_utilities.c
  mydelete2() src/iroffer_utilities.c
  writeserver() src/iroffer_misc.c
Called by: sendserver() src/iroffer_misc.c
References Variables: gdata src/dinoex_main.c
  gnetwork src/dinoex_main.c

Global Function start_md5_hash()

void start_md5_hash ( xdcc* xd, unsigned int packnum )
Prototyped in: src/dinoex_jobs.h
Calls: MD5Init() src/plumb_md5.c
  check_for_file_remove() src/dinoex_jobs.c
  crc32_init() src/dinoex_jobs.c
  ioutput() src/iroffer_utilities.c
  outerror() src/iroffer_utilities.c
  set_socket_nonblocking() src/iroffer_utilities.c
  __error(), open(), strerror()
Called by: a_md5() src/dinoex_admin.c
  mainloop() src/iroffer_main.c
References Variables: gdata src/dinoex_main.c

Global Function start_qupload()

void start_qupload ( void )
Prototyped in: src/dinoex_jobs.h
Calls: irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
  privmsg_fast() src/iroffer_utilities.c
  updatecontext_f() src/iroffer_utilities.c
Called by: a_get() src/dinoex_admin.c
  close_qupload() src/dinoex_jobs.c
References Variables: gdata src/dinoex_main.c
  gnetwork src/dinoex_main.c

Global Function test_fish_message()

char* test_fish_message ( const char* line, const char* channel, const char* str, const char* data )
Prototyped in: src/dinoex_jobs.h
Calls: find_fish_key() src/dinoex_jobs.c
  privmsg_decrypt() src/dinoex_jobs.c
  updatecontext_f() src/iroffer_utilities.c
  strcmp()
Called by: ir_parseline2() src/dinoex_irc.c

Global Function validate_crc32()

const char* validate_crc32 ( xdcc* xd, int quiet )
Prototyped in: src/dinoex_jobs.h
Calls: caps() src/dinoex_utilities.c
  getfilename() src/dinoex_utilities.c
  ioutput() src/iroffer_utilities.c
  mydelete2() src/iroffer_utilities.c
  mymalloc2() src/iroffer_utilities.c
  mystrdup2() src/dinoex_utilities.c
  number_of_pack() src/dinoex_misc.c
  verifyshell() src/dinoex_utilities.c
  fnmatch(), snprintf(), strcmp(), strcpy(), strlen(), strrchr(), strstr()
Called by: a_crc() src/dinoex_admin.c
  complete_md5_hash() src/dinoex_jobs.c
References Variables: badcrc src/dinoex_jobs.c
  gdata src/dinoex_main.c

Global Function vprivmsg_chan()

void vprivmsg_chan ( const channel_t* ch, const char* format, va_list ap )
Prototyped in: src/dinoex_jobs.h
Calls: encrypt_fish() src/dinoex_jobs.c
  ioutput() src/iroffer_utilities.c
  mydelete2() src/iroffer_utilities.c
  outerror() src/iroffer_utilities.c
  removenonprintable() src/dinoex_utilities.c
  writeserver_channel() src/dinoex_jobs.c
  vsnprintf()
Called by: a_respond() src/dinoex_admin.c
  privmsg_chan() src/dinoex_jobs.c
References Variables: gdata src/dinoex_main.c
  gnetwork src/dinoex_main.c

Global Function write_files()

void write_files ( void )
Prototyped in: src/dinoex_jobs.h
Calls: irlist_size() src/iroffer_utilities.c
  write_statefile() src/iroffer_statefile.c
  xdcc_save_xml() src/dinoex_jobs.c
  xdccsavetext() src/iroffer_misc.c
Called by: a_autogroup() src/dinoex_admin.c
  a_chcolor() src/dinoex_admin.c
  a_chgets() src/dinoex_admin.c
  a_chlimit() src/dinoex_admin.c
  a_chlimitinfo() src/dinoex_admin.c
  a_chmaxs() src/dinoex_admin.c
  a_chmins() src/dinoex_admin.c
  a_chtime() src/dinoex_admin.c
  a_chtrigger() src/dinoex_admin.c
  a_cleargets() src/dinoex_admin.c
  a_group() src/dinoex_admin.c
  a_groupdesc() src/dinoex_admin.c
  a_movegroup() src/dinoex_admin.c
  a_newgroup_sub() src/dinoex_admin.c
  a_regroup() src/dinoex_admin.c
  a_rehash_cleanup() src/dinoex_jobs.c
  a_xds() src/dinoex_admin.c
  mainloop() src/iroffer_main.c
  u_clearrecords() src/iroffer_admin.c
  write_files_changed() src/dinoex_admin.c
References Variables: gdata src/dinoex_main.c

Global Function write_removed_xdcc()

void write_removed_xdcc ( xdcc* xd )
Prototyped in: src/dinoex_jobs.h
Calls: find_groupdesc() src/dinoex_jobs.c
  mydelete2() src/iroffer_utilities.c
  mymalloc2() src/iroffer_utilities.c
  open_append() src/dinoex_utilities.c
  close(), snprintf(), write()
Called by: a_remove_pack2() src/dinoex_admin.c
References Variables: gdata src/dinoex_main.c

Global Function writeserver_notice()

void writeserver_notice ( writeserver_type_e delay, const char* nick, const char* message, size_t len )
Prototyped in: src/dinoex_jobs.h
Calls: check_fish_exclude() src/dinoex_jobs.c
  encrypt_fish() src/dinoex_jobs.c
  ioutput() src/iroffer_utilities.c
  mydelete2() src/iroffer_utilities.c
  updatecontext_f() src/iroffer_utilities.c
  writeserver() src/iroffer_misc.c
Called by: vnotice() src/iroffer_utilities.c
  vnotice_fast() src/iroffer_utilities.c
  vnotice_slow() src/iroffer_utilities.c
References Variables: gdata src/dinoex_main.c

Global Function writeserver_privmsg()

void writeserver_privmsg ( writeserver_type_e delay, const char* nick, const char* message, size_t len )
Prototyped in: src/dinoex_jobs.h
Calls: check_fish_exclude() src/dinoex_jobs.c
  encrypt_fish() src/dinoex_jobs.c
  ioutput() src/iroffer_utilities.c
  mydelete2() src/iroffer_utilities.c
  updatecontext_f() src/iroffer_utilities.c
  writeserver() src/iroffer_misc.c
Called by: vprivmsg() src/iroffer_utilities.c
  vprivmsg_fast() src/iroffer_utilities.c
  vprivmsg_slow() src/iroffer_utilities.c
References Variables: gdata src/dinoex_main.c

Local Function admin_clean_input()

ignore empty lines and comments and trailing spaces

static int admin_clean_input ( char* line )

Calls: strlen()
Called by: a_read_config_files() src/dinoex_jobs.c
  admin_jobs() src/dinoex_jobs.c
  import_xdccfile() src/dinoex_jobs.c

Local Function admin_line()

static void admin_line ( int fd, const char* line )
Calls: a_fillwith_msg2() src/dinoex_jobs.c
  mydelete2() src/iroffer_utilities.c
  mymalloc2() src/iroffer_utilities.c
  u_parseit() src/iroffer_admin.c
Called by: admin_run() src/dinoex_jobs.c

Local Function admin_run()

static void admin_run ( const char* cmd )
Calls: admin_line() src/dinoex_jobs.c
  mydelete2() src/iroffer_utilities.c
  mystrdup2() src/dinoex_utilities.c
  mystrsuffix2() src/dinoex_utilities.c
  open_append() src/dinoex_utilities.c
  close()
Called by: run_delayed_jobs() src/dinoex_jobs.c
References Variables: gdata src/dinoex_main.c

Local Function autoadd_scan()

static void autoadd_scan ( const char* dir, const char* group )
Calls: a_fillwith_msg2() src/dinoex_jobs.c
  ioutput() src/iroffer_utilities.c
  irlist_add2() src/iroffer_utilities.c
  mydelete2() src/iroffer_utilities.c
  mymalloc2() src/iroffer_utilities.c
  updatecontext_f() src/iroffer_utilities.c
  snprintf()
Called by: autoadd_all() src/dinoex_jobs.c
References Variables: gdata src/dinoex_main.c
  gnetwork src/dinoex_main.c

Local Function base64_to_long()

static unsigned long base64_to_long ( const char** str )
Called by: decrypt_fish() src/dinoex_jobs.c
References Variables: fish64decode src/dinoex_jobs.c

Local Function byte4_swap()

static ir_uint32 byte4_swap ( ir_uint32 in )
Called by: get_zip_crc32_buffer() src/dinoex_jobs.c

Local Function bytes_to_long()

static unsigned long bytes_to_long ( const char** str )
Called by: encrypt_fish() src/dinoex_jobs.c

Local Function check_fish_exclude()

static const char* check_fish_exclude ( const char* nick )
Calls: verifyshell() src/dinoex_utilities.c
Called by: writeserver_notice() src/dinoex_jobs.c
  writeserver_privmsg() src/dinoex_jobs.c
References Variables: gdata src/dinoex_main.c

Local Function check_for_file_remove()

static int check_for_file_remove ( unsigned int n )
Calls: irlist_get_nth() src/iroffer_utilities.c
  look_for_file_changes() src/iroffer_misc.c
  mydelete2() src/iroffer_utilities.c
  mymalloc2() src/iroffer_utilities.c
  u_fillwith_console() src/iroffer_admin.c
  u_parseit() src/iroffer_admin.c
  updatecontext_f() src/iroffer_utilities.c
  snprintf()
Called by: look_for_file_remove() src/dinoex_jobs.c
  start_md5_hash() src/dinoex_jobs.c
References Variables: gdata src/dinoex_main.c

Local Function cleanannounce()

static void cleanannounce ( void )
Calls: irlist_delete() src/iroffer_utilities.c
  irlist_get_head() src/iroffer_utilities.c
  mydelete2() src/iroffer_utilities.c
Called by: clean_send_buffers() src/dinoex_jobs.c
References Variables: gnetwork src/dinoex_main.c

Local Function crc32_final()

static void crc32_final ( xdcc* xd )
Called by: complete_md5_hash() src/dinoex_jobs.c
References Variables: gdata src/dinoex_main.c

Local Function crc32_init()

static void crc32_init ( void )
Called by: start_md5_hash() src/dinoex_jobs.c
References Variables: gdata src/dinoex_main.c

Local Function decrypt_fish()

static char* decrypt_fish ( const char* str, size_t len, const char* key )
Calls: Blowfish_Decrypt() src/blowfish.c
  Blowfish_Init() src/blowfish.c
  base64_to_long() src/dinoex_jobs.c
  mymalloc2() src/iroffer_utilities.c
  updatecontext_f() src/iroffer_utilities.c
  memset(), strlen()
Called by: privmsg_decrypt() src/dinoex_jobs.c

Local Function encrypt_fish()

static char* encrypt_fish ( const char* str, size_t len, const char* key )
Calls: Blowfish_Encrypt() src/blowfish.c
  Blowfish_Init() src/blowfish.c
  bytes_to_long() src/dinoex_jobs.c
  mymalloc2() src/iroffer_utilities.c
  updatecontext_f() src/iroffer_utilities.c
  memset(), strlen()
Called by: vprivmsg_chan() src/dinoex_jobs.c
  writeserver_notice() src/dinoex_jobs.c
  writeserver_privmsg() src/dinoex_jobs.c
References Variables: FISH64 src/dinoex_jobs.c

Local Function file_not_exits()

static int file_not_exits ( const char* path )
Calls: __error(), close(), open()
Called by: save_unlink() src/dinoex_jobs.c

Local Function find_fish_key()

static const char* find_fish_key ( const char* channel )
Calls: irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
  updatecontext_f() src/iroffer_utilities.c
  strcasecmp()
Called by: test_fish_message() src/dinoex_jobs.c
References Variables: gdata src/dinoex_main.c
  gnetwork src/dinoex_main.c

Local Function get_zip_crc32_buffer()

check for CRC32 in compressed buffer

static ir_uint32 get_zip_crc32_buffer ( char* buffer )

Calls: byte4_swap() src/dinoex_jobs.c
  __bswap32(), memcmp(), memcpy()
Called by: get_zip_crc32_pack() src/dinoex_jobs.c
References Variables: magic_crc_table src/dinoex_jobs.c

Local Function import_pack()

static void import_pack ( const char* xx_file, const char* xx_desc, const char* xx_note, unsigned int xx_gets, float xx_mins, float xx_maxs, const char* xx_data, const char* xx_trno )
Calls: a_access_fstat() src/dinoex_admin.c
  a_open_file() src/dinoex_admin.c
  a_respond() src/dinoex_admin.c
  add_default_groupdesc() src/dinoex_admin.c
  convert_to_unix_slash() src/iroffer_utilities.c
  getfilename() src/dinoex_utilities.c
  irlist_add2() src/iroffer_utilities.c
  irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
  mydelete2() src/iroffer_utilities.c
  mystrdup2() src/dinoex_utilities.c
  reorder_new_groupdesc() src/dinoex_admin.c
  set_support_groups() src/dinoex_misc.c
  u_fillwith_console2() src/dinoex_jobs.c
  updatecontext_f() src/iroffer_utilities.c
  bzero(), strcasecmp()
Called by: import_xdccfile() src/dinoex_jobs.c
References Variables: gdata src/dinoex_main.c

Local Function irlist_move()

static void irlist_move ( irlist_t* dest, irlist_t* src )
Called by: a_rehash_channels() src/dinoex_jobs.c
  a_rehash_prepare() src/dinoex_jobs.c

Local Function privmsg_decrypt()

static char* privmsg_decrypt ( const char* line, const char* channel, const char* key, const char* data )
Calls: decrypt_fish() src/dinoex_jobs.c
  ioutput() src/iroffer_utilities.c
  mydelete2() src/iroffer_utilities.c
  mystrdup2() src/dinoex_utilities.c
  updatecontext_f() src/iroffer_utilities.c
  snprintf(), strchr(), strlen()
Called by: test_fish_message() src/dinoex_jobs.c
References Variables: gdata src/dinoex_main.c

Local Function readdir_sub()

static int readdir_sub ( const char* thedir, DIR* dirp, struct dirent* entry, struct dirent** result )
Calls: outerror() src/iroffer_utilities.c
  __error(), readdir_r(), strerror()
Called by: expire_logfiles() src/dinoex_jobs.c

Local Function save_unlink_failed()

static void save_unlink_failed ( const char* path, const char* dest )
Calls: outerror() src/iroffer_utilities.c
  __error(), strerror()
Called by: save_unlink() src/dinoex_jobs.c

Local Function u_fillwith_console2()

static void u_fillwith_console2 ( userinput* const u )
Called by: import_pack() src/dinoex_jobs.c

Local Function vwriteserver_channel()

static void vwriteserver_channel ( unsigned int delay, const char* format, va_list ap )
Calls: ioutput() src/iroffer_utilities.c
  irlist_add2() src/iroffer_utilities.c
  irlist_size() src/iroffer_utilities.c
  mydelete2() src/iroffer_utilities.c
  mymalloc2() src/iroffer_utilities.c
  outerror() src/iroffer_utilities.c
  updatecontext_f() src/iroffer_utilities.c
  vsnprintf()
Called by: writeserver_channel() src/dinoex_jobs.c
References Variables: gdata src/dinoex_main.c
  gnetwork src/dinoex_main.c

Local Function write_asc_hex()

static void write_asc_hex ( xml_buffer_t* xmlbuf, int spaces, const char* tag, unsigned long val )
Calls: xml_buffer_check() src/dinoex_jobs.c
  snprintf()
Called by: xdcc_save_xml() src/dinoex_jobs.c

Local Function write_asc_int()

static void write_asc_int ( xml_buffer_t* xmlbuf, int spaces, const char* tag, unsigned int val )
Calls: xml_buffer_check() src/dinoex_jobs.c
  snprintf()
Called by: xdcc_save_xml() src/dinoex_jobs.c

Local Function write_asc_int64()

static void write_asc_int64 ( xml_buffer_t* xmlbuf, int spaces, const char* tag, ir_int64 val )
Calls: xml_buffer_check() src/dinoex_jobs.c
  snprintf()
Called by: xdcc_save_xml() src/dinoex_jobs.c

Local Function write_asc_plain()

static void write_asc_plain ( xml_buffer_t* xmlbuf, int spaces, const char* tag, const char* val )
Calls: xml_buffer_check() src/dinoex_jobs.c
  snprintf()
Called by: xdcc_save_xml() src/dinoex_jobs.c

Local Function write_asc_text()

static void write_asc_text ( xml_buffer_t* xmlbuf, int spaces, const char* tag, const char* val )
Calls: xml_buffer_check() src/dinoex_jobs.c
  snprintf()
Called by: xdcc_save_xml() src/dinoex_jobs.c

Local Function write_string()

static void write_string ( xml_buffer_t* xmlbuf, const char* line )
Calls: xml_buffer_check() src/dinoex_jobs.c
  strlen(), strncpy()
Called by: xdcc_save_xml() src/dinoex_jobs.c

Local Function writeserver_channel()

static void writeserver_channel ( unsigned int delay, const char* format, ... )
Calls: vwriteserver_channel() src/dinoex_jobs.c
  __builtin_va_end(), __builtin_va_start()
Called by: vprivmsg_chan() src/dinoex_jobs.c

Local Function xdcc_save_xml()

static void xdcc_save_xml ( void )
Calls: get_config_nick() src/dinoex_irc.c
  get_current_bandwidth() src/dinoex_misc.c
  get_user_nick() src/dinoex_irc.c
  getuptime() src/iroffer_utilities.c
  hide_pack() src/dinoex_misc.c
  irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
  irlist_size() src/iroffer_utilities.c
  mydelete2() src/iroffer_utilities.c
  mymalloc2() src/iroffer_utilities.c
  mystrdup2() src/dinoex_utilities.c
  mystrsuffix2() src/dinoex_utilities.c
  outerror() src/iroffer_utilities.c
  removenonprintable() src/dinoex_utilities.c
  rename_with_backup() src/dinoex_jobs.c
  sizestr() src/dinoex_utilities.c
  slotsfree() src/dinoex_misc.c
  updatecontext_f() src/iroffer_utilities.c
  write_asc_hex() src/dinoex_jobs.c
  write_asc_int() src/dinoex_jobs.c
  write_asc_int64() src/dinoex_jobs.c
  write_asc_plain() src/dinoex_jobs.c
  write_asc_text() src/dinoex_jobs.c
  write_string() src/dinoex_jobs.c
  xml_buffer_flush() src/dinoex_jobs.c
  xml_buffer_init() src/dinoex_jobs.c
  __error(), close(), open(), snprintf(), strerror()
Called by: write_files() src/dinoex_jobs.c
References Variables: gdata src/dinoex_main.c
  gnetwork src/dinoex_main.c

Local Function xml_buffer_check()

static void xml_buffer_check ( xml_buffer_t* xmlbuf, size_t len )
Calls: xml_buffer_flush() src/dinoex_jobs.c
Called by: write_asc_hex() src/dinoex_jobs.c
  write_asc_int() src/dinoex_jobs.c
  write_asc_int64() src/dinoex_jobs.c
  write_asc_plain() src/dinoex_jobs.c
  write_asc_text() src/dinoex_jobs.c
  write_string() src/dinoex_jobs.c

Local Function xml_buffer_flush()

static void xml_buffer_flush ( xml_buffer_t* xmlbuf )
Calls: outerror() src/iroffer_utilities.c
  xml_buffer_init() src/dinoex_jobs.c
  __error(), strerror(), write()
Called by: xdcc_save_xml() src/dinoex_jobs.c
  xml_buffer_check() src/dinoex_jobs.c

Local Function xml_buffer_init()

static void xml_buffer_init ( xml_buffer_t* xmlbuf )
Called by: xdcc_save_xml() src/dinoex_jobs.c
  xml_buffer_flush() src/dinoex_jobs.c