Changes in / [4eb4c0f:8961950]
- Files:
-
- 2 deleted
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
r4eb4c0f r8961950 50 50 $(MAKE) -C tests 51 51 52 lcov: 52 53 gcov: check 53 54 gcov *.c -
bitlbee.c
r4eb4c0f r8961950 48 48 hints.ai_family = PF_UNSPEC; 49 49 hints.ai_socktype = SOCK_STREAM; 50 hints.ai_flags = AI_PASSIVE 51 #ifdef AI_ADDRCONFIG 52 | AI_ADDRCONFIG 53 #endif 54 ; 50 hints.ai_flags = AI_ADDRCONFIG | AI_PASSIVE; 55 51 56 52 i = getaddrinfo( global.conf->iface, global.conf->port, &hints, &addrinfo_bind ); -
bitlbee.h
r4eb4c0f r8961950 99 99 #endif 100 100 101 #ifndef G_GNUC_MALLOC102 /* Doesn't exist in GLib <=2.4 while everything else in BitlBee should103 work with it, so let's fake this one. */104 #define G_GNUC_MALLOC105 #endif106 107 101 #define _( x ) x 108 102 … … 121 115 #define HELP_FILE VARDIR "help.txt" 122 116 #define CONF_FILE_DEF ETCDIR "bitlbee.conf" 117 118 extern char *CONF_FILE; 123 119 124 120 #include "irc.h" … … 144 140 gint listen_watch_source_id; 145 141 help_t *help; 146 char *conf_file;147 142 conf_t *conf; 148 143 GList *storage; /* The first backend in the list will be used for saving */ -
conf.c
r4eb4c0f r8961950 36 36 #include "proxy.h" 37 37 38 char *CONF_FILE; 39 38 40 static int conf_loadini( conf_t *conf, char *file ); 39 41 … … 41 43 { 42 44 conf_t *conf; 43 int opt, i , config_missing = 0;45 int opt, i; 44 46 45 47 conf = g_new0( conf_t, 1 ); … … 65 67 proxytype = 0; 66 68 67 i = conf_loadini( conf, global.conf_file);69 i = conf_loadini( conf, CONF_FILE ); 68 70 if( i == 0 ) 69 71 { 70 fprintf( stderr, "Error: Syntax error in configuration file `%s'.\n", global.conf_file);71 return NULL;72 fprintf( stderr, "Error: Syntax error in configuration file `%s'.\n", CONF_FILE ); 73 return( NULL ); 72 74 } 73 75 else if( i == -1 ) 74 76 { 75 config_missing ++; 76 /* Whine after parsing the options if there was no -c pointing 77 at a *valid* configuration file. */ 77 fprintf( stderr, "Warning: Unable to read configuration file `%s'.\n", CONF_FILE ); 78 78 } 79 79 … … 107 107 else if( opt == 'c' ) 108 108 { 109 if( strcmp( global.conf_file, optarg ) != 0 )110 { 111 g_free( global.conf_file);112 global.conf_file= g_strdup( optarg );109 if( strcmp( CONF_FILE, optarg ) != 0 ) 110 { 111 g_free( CONF_FILE ); 112 CONF_FILE = g_strdup( optarg ); 113 113 g_free( conf ); 114 114 /* Re-evaluate arguments. Don't use this option twice, … … 116 116 works with all libcs BTW.. */ 117 117 optind = 1; 118 return conf_load( argc, argv);118 return( conf_load( argc, argv ) ); 119 119 } 120 120 } … … 144 144 " -d Specify alternative user configuration directory\n" 145 145 " -h Show this help page.\n" ); 146 return NULL;146 return( NULL ); 147 147 } 148 148 else if( opt == 'R' ) … … 170 170 } 171 171 172 if( config_missing ) 173 fprintf( stderr, "Warning: Unable to read configuration file `%s'.\n", global.conf_file ); 174 175 return conf; 172 return( conf ); 176 173 } 177 174 … … 182 179 183 180 ini = ini_open( file ); 184 if( ini == NULL ) return -1;181 if( ini == NULL ) return( -1 ); 185 182 while( ini_read( ini ) ) 186 183 { … … 265 262 { 266 263 fprintf( stderr, "Invalid %s value: %s\n", ini->key, ini->value ); 267 return 0;264 return( 0 ); 268 265 } 269 266 conf->ping_interval = i; … … 274 271 { 275 272 fprintf( stderr, "Invalid %s value: %s\n", ini->key, ini->value ); 276 return 0;273 return( 0 ); 277 274 } 278 275 conf->ping_timeout = i; … … 286 283 fprintf( stderr, "Invalid %s value: %s\n", ini->key, ini->value ); 287 284 g_free( url ); 288 return 0;285 return( 0 ); 289 286 } 290 287 … … 310 307 { 311 308 fprintf( stderr, "Error: Unknown setting `%s` in configuration file.\n", ini->key ); 312 return 0;309 return( 0 ); 313 310 /* For now just ignore unknown keys... */ 314 311 } … … 318 315 fprintf( stderr, "Error: Unknown section [%s] in configuration file. " 319 316 "BitlBee configuration must be put in a [settings] section!\n", ini->section ); 320 return 0;317 return( 0 ); 321 318 } 322 319 } 323 320 ini_close( ini ); 324 321 325 return 1;322 return( 1 ); 326 323 } 327 324 … … 330 327 ini_t *ini; 331 328 332 ini = ini_open( global.conf_file);329 ini = ini_open( CONF_FILE ); 333 330 if( ini == NULL ) return; 334 331 while( ini_read( ini ) ) -
crypting.c
r4eb4c0f r8961950 29 29 the programs will be built. */ 30 30 31 #include <bitlbee.h> 31 #include <string.h> 32 #include <stdio.h> 33 #include <stdlib.h> 34 #include <glib.h> 32 35 #include "md5.h" 33 36 #include "crypting.h" -
help.c
r4eb4c0f r8961950 71 71 { 72 72 /* FIXME: Clean up */ 73 help_free( help ); 73 // help_close( *help ); 74 *help = NULL; 74 75 g_free( s ); 75 return NULL;76 return( NULL ); 76 77 } 77 78 i = strchr( s, '\n' ) - s; 78 79 79 if( h-> title)80 if( h->string ) 80 81 { 81 82 h = h->next = g_new0( help_t, 1 ); 82 83 } 83 h-> title= g_new ( char, i );84 h->string = g_new ( char, i ); 84 85 85 strncpy( h-> title, s + 1, i - 1 );86 h-> title[i-1] = 0;86 strncpy( h->string, s + 1, i - 1 ); 87 h->string[i-1] = 0; 87 88 h->fd = (*help)->fd; 88 89 h->offset.file_offset = lseek( h->fd, 0, SEEK_CUR ) - buflen + i + 1; … … 102 103 } 103 104 104 void help_free( help_t **help ) 105 { 106 help_t *h, *oh; 107 int last_fd = -1; /* Weak de-dupe */ 108 109 if( help == NULL || *help == NULL ) 110 return; 111 112 h = *help; 113 while( h ) 114 { 115 if( h->fd != last_fd ) 116 { 117 close( h->fd ); 118 last_fd = h->fd; 119 } 120 g_free( h->title ); 121 h = (oh=h)->next; 122 g_free( oh ); 123 } 124 125 *help = NULL; 126 } 127 128 char *help_get( help_t **help, char *title ) 105 char *help_get( help_t **help, char *string ) 129 106 { 130 107 time_t mtime; … … 134 111 for( h = *help; h; h = h->next ) 135 112 { 136 if( h->title != NULL && g_strcasecmp( h->title, title ) == 0 ) 113 if( h->string != NULL && 114 g_strcasecmp( h->string, string ) == 0 ) 137 115 break; 138 116 } … … 141 119 char *s = g_new( char, h->length + 1 ); 142 120 121 if( fstat( h->fd, stat ) != 0 ) 122 { 123 g_free( h ); 124 *help = NULL; 125 return NULL; 126 } 127 mtime = stat->st_mtime; 128 129 if( mtime > h->mtime ) 130 return NULL; 131 143 132 s[h->length] = 0; 144 133 if( h->fd >= 0 ) 145 134 { 146 if( fstat( h->fd, stat ) != 0 )147 {148 g_free( s );149 return NULL;150 }151 mtime = stat->st_mtime;152 153 if( mtime > h->mtime )154 {155 g_free( s );156 return NULL;157 }158 159 135 lseek( h->fd, h->offset.file_offset, SEEK_SET ); 160 136 read( h->fd, s, h->length ); -
help.h
r4eb4c0f r8961950 37 37 int fd; 38 38 time_t mtime; 39 char * title;39 char *string; 40 40 help_off_t offset; 41 41 int length; … … 44 44 45 45 G_GNUC_MALLOC help_t *help_init( help_t **help, const char *helpfile ); 46 void help_free( help_t **help ); 47 char *help_get( help_t **help, char *title ); 46 char *help_get( help_t **help, char *string ); 48 47 49 48 #endif -
irc.c
r4eb4c0f r8961950 77 77 78 78 if( getnameinfo( (struct sockaddr *) &sock, socklen, buf, 79 NI_MAXHOST, NULL, 0, 0 ) == 0 )79 NI_MAXHOST, NULL, -1, 0 ) == 0 ) 80 80 { 81 81 irc->myhost = g_strdup( ipv6_unwrap( buf ) ); … … 88 88 89 89 if( getnameinfo( (struct sockaddr *)&sock, socklen, buf, 90 NI_MAXHOST, NULL, 0, 0 ) == 0 )90 NI_MAXHOST, NULL, -1, 0 ) == 0 ) 91 91 { 92 92 irc->host = g_strdup( ipv6_unwrap( buf ) ); … … 199 199 account_t *account; 200 200 user_t *user, *usertmp; 201 help_t *helpnode, *helpnodetmp; 201 202 202 203 log_message( LOGLVL_INFO, "Destroying connection with fd %d", irc->fd ); … … 274 275 g_hash_table_foreach_remove(irc->watches, irc_free_hashkey, NULL); 275 276 g_hash_table_destroy(irc->watches); 277 278 if (irc->help != NULL) { 279 helpnode = irc->help; 280 while (helpnode != NULL) { 281 g_free(helpnode->string); 282 283 helpnodetmp = helpnode; 284 helpnode = helpnode->next; 285 g_free(helpnodetmp); 286 } 287 } 276 288 277 289 otr_free(irc->otr); -
irc.h
r4eb4c0f r8961950 91 91 GHashTable *watches; 92 92 struct __NICK *nicks; 93 struct help *help; 93 94 struct set *set; 94 95 -
irc_commands.c
r4eb4c0f r8961950 556 556 557 557 for( h = global.help; h; h = h->next ) 558 irc_privmsg( irc, u, "NOTICE", irc->nick, "COMPLETIONS help ", h-> title);558 irc_privmsg( irc, u, "NOTICE", irc->nick, "COMPLETIONS help ", h->string ); 559 559 560 560 for( s = irc->set; s; s = s->next ) … … 571 571 ipc_to_master( cmd ); 572 572 573 irc_reply( irc, 382, "%s :Rehashing", global.conf_file);573 irc_reply( irc, 382, "%s :Rehashing", CONF_FILE ); 574 574 } 575 575 -
lib/Makefile
r4eb4c0f r8961950 18 18 all: lib.o 19 19 check: all 20 lcov: check20 lcov: 21 21 gcov: 22 22 gcov *.c -
protocols/Makefile
r4eb4c0f r8961950 27 27 all: protocols.o 28 28 check: all 29 lcov: check29 lcov: 30 30 gcov: 31 31 gcov *.c -
protocols/jabber/Makefile
r4eb4c0f r8961950 18 18 all: jabber_mod.o 19 19 check: all 20 lcov: check20 lcov: 21 21 gcov: 22 22 gcov *.c -
protocols/jabber/conference.c
r4eb4c0f r8961950 37 37 xt_add_attr( node, "xmlns", XMLNS_MUC ); 38 38 node = jabber_make_packet( "presence", NULL, roomjid, node ); 39 if( password )40 xt_add_child( node, xt_new_node( "password", password, NULL ) );41 39 jabber_cache_add( ic, node, jabber_chat_join_failed ); 42 40 … … 124 122 struct jabber_chat *jc = c->data; 125 123 struct xt_node *node; 126 127 jc->flags |= JCFLAG_MESSAGE_SENT;128 124 129 125 node = xt_new_node( "body", message, NULL ); … … 299 295 struct xt_node *subject = xt_find_node( node->children, "subject" ); 300 296 struct xt_node *body = xt_find_node( node->children, "body" ); 301 struct groupchat *chat = bud ? jabber_chat_by_jid( ic, bud->bare_jid ) : NULL; 302 struct jabber_chat *jc = chat ? chat->data : NULL; 297 struct groupchat *chat = NULL; 303 298 char *s; 304 299 305 if( bud == NULL || ( jc && ~jc->flags & JCFLAG_MESSAGE_SENT && bud == jc->me ))300 if( bud == NULL ) 306 301 { 307 302 char *nick; … … 351 346 return; 352 347 } 353 else if( chat== NULL )348 else if( ( chat = jabber_chat_by_jid( ic, bud->bare_jid ) ) == NULL ) 354 349 { 355 350 /* How could this happen?? We could do kill( self, 11 ) -
protocols/jabber/iq.c
r4eb4c0f r8961950 92 92 else if( strcmp( s, XMLNS_DISCOVER ) == 0 ) 93 93 { 94 const char *features[] = { XMLNS_DISCOVER, 95 XMLNS_VERSION, 94 const char *features[] = { XMLNS_VERSION, 96 95 XMLNS_TIME, 97 96 XMLNS_CHATSTATES, -
protocols/jabber/jabber.h
r4eb4c0f r8961950 49 49 typedef enum 50 50 { 51 JBFLAG_PROBED_XEP85 = 1, 51 JBFLAG_PROBED_XEP85 = 1, /* Set this when we sent our probe packet to make 52 52 sure it gets sent only once. */ 53 JBFLAG_DOES_XEP85 = 2, 53 JBFLAG_DOES_XEP85 = 2, /* Set this when the resource seems to support 54 54 XEP85 (typing notification shite). */ 55 JBFLAG_IS_CHATROOM = 4, 55 JBFLAG_IS_CHATROOM = 4, /* It's convenient to use this JID thingy for 56 56 groupchat state info too. */ 57 JBFLAG_IS_ANONYMOUS = 8, 57 JBFLAG_IS_ANONYMOUS = 8, /* For anonymous chatrooms, when we don't have 58 58 have a real JID. */ 59 59 } jabber_buddy_flags_t; 60 61 typedef enum62 {63 JCFLAG_MESSAGE_SENT = 1, /* Set this after sending the first message, so64 we can detect echoes/backlogs. */65 } jabber_chat_flags_t;66 60 67 61 struct jabber_data … … 101 95 struct jabber_cache_entry 102 96 { 103 time_t saved_at;104 97 struct xt_node *node; 105 98 jabber_cache_event func; … … 147 140 #define JABBER_PACKET_ID "BeeP" 148 141 #define JABBER_CACHED_ID "BeeC" 149 150 /* The number of seconds to keep cached packets before garbage collecting151 them. This gc is done on every keepalive (every minute). */152 #define JABBER_CACHE_MAX_AGE 600153 142 154 143 /* RFC 392[01] stuff */ … … 172 161 #define XMLNS_MUC "http://jabber.org/protocol/muc" /* XEP-0045 */ 173 162 #define XMLNS_MUC_USER "http://jabber.org/protocol/muc#user"/* XEP-0045 */ 174 #define XMLNS_CAPS "http://jabber.org/protocol/caps" /* XEP-0115 */175 163 176 164 /* iq.c */ -
protocols/jabber/jabber_util.c
r4eb4c0f r8961950 142 142 entry->node = node; 143 143 entry->func = func; 144 entry->saved_at = time( NULL );145 144 g_hash_table_insert( jd->node_cache, xt_find_attr( node, "id" ), entry ); 146 145 } … … 164 163 { 165 164 struct jabber_data *jd = ic->proto_data; 166 time_t threshold = time( NULL ) - JABBER_CACHE_MAX_AGE; 167 168 g_hash_table_foreach_remove( jd->node_cache, jabber_cache_clean_entry, &threshold ); 169 } 170 171 gboolean jabber_cache_clean_entry( gpointer key, gpointer entry_, gpointer threshold_ ) 165 166 g_hash_table_foreach_remove( jd->node_cache, jabber_cache_clean_entry, NULL ); 167 } 168 169 gboolean jabber_cache_clean_entry( gpointer key, gpointer entry_, gpointer nullpointer ) 172 170 { 173 171 struct jabber_cache_entry *entry = entry_; 174 time_t *threshold = threshold_; 175 176 return entry->saved_at < *threshold; 172 struct xt_node *node = entry->node; 173 174 if( node->flags & XT_SEEN ) 175 return TRUE; 176 else 177 { 178 node->flags |= XT_SEEN; 179 return FALSE; 180 } 177 181 } 178 182 -
protocols/jabber/presence.c
r4eb4c0f r8961950 29 29 char *from = xt_find_attr( node, "from" ); 30 30 char *type = xt_find_attr( node, "type" ); /* NULL should mean the person is online. */ 31 struct xt_node *c , *cap;31 struct xt_node *c; 32 32 struct jabber_buddy *bud, *send_presence = NULL; 33 33 int is_chat = 0; … … 76 76 else 77 77 bud->priority = 0; 78 79 if( bud && ( cap = xt_find_node( node->children, "c" ) ) &&80 ( s = xt_find_attr( cap, "xmlns" ) ) && strcmp( s, XMLNS_CAPS ) == 0 )81 {82 /* This <presence> stanza includes an XEP-011583 capabilities part. Not too interesting, but we can84 see if it has an ext= attribute. */85 s = xt_find_attr( cap, "ext" );86 if( s && ( strstr( s, "cstates" ) || strstr( s, "chatstate" ) ) )87 bud->flags |= JBFLAG_DOES_XEP85;88 89 /* This field can contain more information like xhtml90 support, but we don't support that ourselves.91 Officially the ext= tag was deprecated, but enough92 clients do send it.93 94 (I'm aware that this is not the right way to use95 this field.) See for an explanation of ext=:96 http://www.xmpp.org/extensions/attic/xep-0115-1.3.html*/97 }98 78 99 79 if( is_chat ) … … 206 186 { 207 187 struct jabber_data *jd = ic->proto_data; 208 struct xt_node *node , *cap;188 struct xt_node *node; 209 189 char *show = jd->away_state->code; 210 190 char *status = jd->away_message; … … 219 199 xt_add_child( node, xt_new_node( "status", status, NULL ) ); 220 200 221 /* This makes the packet slightly bigger, but clients interested in222 capabilities can now cache the discovery info. This reduces the223 usual post-login iq-flood. See XEP-0115. At least libpurple and224 Trillian seem to do this right. */225 cap = xt_new_node( "c", NULL, NULL );226 xt_add_attr( cap, "xmlns", XMLNS_CAPS );227 xt_add_attr( cap, "node", "http://bitlbee.org/xmpp/caps" );228 xt_add_attr( cap, "ver", BITLBEE_VERSION ); /* The XEP wants this hashed, but nobody's doing that. */229 xt_add_child( node, cap );230 231 201 st = jabber_write_packet( ic, node ); 232 202 -
protocols/jabber/sasl.c
r4eb4c0f r8961950 21 21 * * 22 22 \***************************************************************************/ 23 24 #include <ctype.h>25 23 26 24 #include "jabber.h" … … 109 107 } 110 108 111 /* Non-static function, but not mentioned in jabber.h because it's for internal 112 use, just that the unittest should be able to reach it... */ 113 char *sasl_get_part( char *data, char *field ) 109 static char *sasl_get_part( char *data, char *field ) 114 110 { 115 111 int i, len; 116 112 117 113 len = strlen( field ); 118 119 while( isspace( *data ) || *data == ',' )120 data ++;121 114 122 115 if( g_strncasecmp( data, field, len ) == 0 && data[len] == '=' ) … … 136 129 } 137 130 138 /* If we got a comma, we got a new field. Check it, 139 find the next key after it. */ 140 if( data[i] == ',' ) 131 /* If we got a comma, we got a new field. Check it. */ 132 if( data[i] == ',' && 133 g_strncasecmp( data + i + 1, field, len ) == 0 && 134 data[i+len+1] == '=' ) 141 135 { 142 while( isspace( data[i] ) || data[i] == ',' ) 143 i ++; 144 145 if( g_strncasecmp( data + i, field, len ) == 0 && 146 data[i+len] == '=' ) 147 { 148 i += len + 1; 149 break; 150 } 136 i += len + 2; 137 break; 151 138 } 152 139 } -
protocols/msn/Makefile
r4eb4c0f r8961950 18 18 all: msn_mod.o 19 19 check: all 20 lcov: check20 lcov: 21 21 gcov: 22 22 gcov *.c -
protocols/msn/ns.c
r4eb4c0f r8961950 584 584 else 585 585 { 586 /* debug( "Received unknown command from main server: %s", cmd[0] ); */586 debug( "Received unknown command from main server: %s", cmd[0] ); 587 587 } 588 588 -
protocols/msn/sb.c
r4eb4c0f r8961950 594 594 else 595 595 { 596 /* debug( "Received unknown command from switchboard server: %s", cmd[0] ); */596 debug( "Received unknown command from switchboard server: %s", cmd[0] ); 597 597 } 598 598 -
protocols/oscar/Makefile
r4eb4c0f r8961950 18 18 all: oscar_mod.o 19 19 check: all 20 lcov: check20 lcov: 21 21 gcov: 22 22 gcov *.c -
protocols/oscar/oscar.c
r4eb4c0f r8961950 1066 1066 g_snprintf(tmp, BUF_LONG, "%s", args->msg); 1067 1067 } else { 1068 aim_mpmsg_section_t *part;1068 int i; 1069 1069 1070 1070 *tmp = 0; 1071 for (part = args->mpmsg.parts; part; part = part->next) { 1072 if (part->data) { 1073 g_strlcat(tmp, (char*) part->data, BUF_LONG); 1074 g_strlcat(tmp, "\n", BUF_LONG); 1075 } 1071 for (i = 0; i < args->mpmsg.numparts; i ++) { 1072 g_strlcat(tmp, (char*) args->mpmsg.parts[i].data, BUF_LONG); 1073 g_strlcat(tmp, "\n", BUF_LONG); 1076 1074 } 1077 1075 } -
protocols/yahoo/Makefile
r4eb4c0f r8961950 18 18 all: yahoo_mod.o 19 19 check: all 20 lcov: check20 lcov: 21 21 gcov: 22 22 gcov *.c -
root_commands.c
r4eb4c0f r8961950 454 454 { 455 455 add_on_server = 0; 456 cmd ++; 456 cmd ++; /* So evil... :-D */ 457 457 } 458 458 … … 486 486 } 487 487 488 /* By making this optional, you can talk to people without having to 489 add them to your *real* (server-side) contact list. */ 488 490 if( add_on_server ) 489 491 a->ic->acc->prpl->add_buddy( a->ic, cmd[2], NULL ); 490 else 491 /* Yeah, officially this is a call-*back*... So if we just 492 called add_buddy, we'll wait for the IM server to respond 493 before we do this. */ 494 imcb_add_buddy( a->ic, cmd[2], NULL ); 492 493 /* add_buddy( a->ic, NULL, cmd[2], cmd[2] ); */ 495 494 496 495 irc_usermsg( irc, "Adding `%s' to your contact list", cmd[2] ); -
storage_text.c
r4eb4c0f r8961950 30 30 static void text_init (void) 31 31 { 32 /* Don't complain about the configuration directory anymore, leave it33 up to the XML storage module, which uses the same directory for it34 anyway. Nobody should be using just the text plugin anymore since35 it's read only! */32 if( access( global.conf->configdir, F_OK ) != 0 ) 33 log_message( LOGLVL_WARNING, "The configuration directory %s does not exist. Configuration won't be saved.", global.conf->configdir ); 34 else if( access( global.conf->configdir, R_OK ) != 0 || access( global.conf->configdir, W_OK ) != 0 ) 35 log_message( LOGLVL_WARNING, "Permission problem: Can't read/write from/to %s.", global.conf->configdir ); 36 36 } 37 37 -
storage_xml.c
r4eb4c0f r8961950 263 263 { 264 264 if( access( global.conf->configdir, F_OK ) != 0 ) 265 log_message( LOGLVL_WARNING, "The configuration directory `%s'does not exist. Configuration won't be saved.", global.conf->configdir );265 log_message( LOGLVL_WARNING, "The configuration directory %s does not exist. Configuration won't be saved.", global.conf->configdir ); 266 266 else if( access( global.conf->configdir, R_OK ) != 0 || access( global.conf->configdir, W_OK ) != 0 ) 267 log_message( LOGLVL_WARNING, "Permission problem: Can't read/write from/to `%s'.", global.conf->configdir );267 log_message( LOGLVL_WARNING, "Permission problem: Can't read/write from/to %s.", global.conf->configdir ); 268 268 } 269 269 -
tests/Makefile
r4eb4c0f r8961950 11 11 distclean: clean 12 12 13 main_objs = account.o bitlbee.o conf.o crypting.o help.o ipc.o irc.o irc_commands.o log.o nick.o query.o root_commands.o set.o storage.o storage_xml.o storage_text.o user.o 13 main_objs = account.o bitlbee.o conf.o crypting.o help.o ipc.o irc.o irc_commands.o log.o nick.o query.o root_commands.o set.o storage.o storage_xml.o storage_text.o user.o 14 14 15 test_objs = check.o check_util.o check_nick.o check_md5.o check_arc.o check_irc.o check_help.o check_user.o check_crypting.o check_set.o check_jabber_sasl.o15 test_objs = check.o check_util.o check_nick.o check_md5.o check_arc.o check_irc.o check_help.o check_user.o check_crypting.o check_set.o 16 16 17 17 check: $(test_objs) $(addprefix ../, $(main_objs)) ../protocols/protocols.o ../lib/lib.o -
tests/check.c
r4eb4c0f r8961950 66 66 Suite *set_suite(void); 67 67 68 /* From check_jabber_sasl.c */69 Suite *jabber_sasl_suite(void);70 71 68 int main (int argc, char **argv) 72 69 { … … 114 111 srunner_add_suite(sr, crypting_suite()); 115 112 srunner_add_suite(sr, set_suite()); 116 srunner_add_suite(sr, jabber_sasl_suite());117 113 if (no_fork) 118 114 srunner_set_fork_status(sr, CK_NOFORK); -
tests/check_arc.c
r4eb4c0f r8961950 62 62 0x73, 0x6d, 0xb3, 0x0a, 0x6f, 0x0a, 0x2b, 0x43, 0x57, 0xe9, 0x3e, 0x63 63 63 }, 24, "OSCAR is creepy..." 64 }, 65 { "", 0, NULL } 64 } 66 65 }; 67 66 … … 70 69 int i; 71 70 72 for( i = 0; decrypt_tests[i].len; i++ )71 for( i = 0; clear_tests[i]; i++ ) 73 72 { 74 73 tcase_fn_start (decrypt_tests[i].decrypted, __FILE__, __LINE__); -
unix.c
r4eb4c0f r8961950 48 48 49 49 log_init(); 50 global.conf_file= g_strdup( CONF_FILE_DEF );50 CONF_FILE = g_strdup( CONF_FILE_DEF ); 51 51 global.conf = conf_load( argc, argv ); 52 52 if( global.conf == NULL ) … … 126 126 if( !getuid() || !geteuid() ) 127 127 log_message( LOGLVL_WARNING, "BitlBee is running with root privileges. Why?" ); 128 if( help_init( & global.help, global.helpfile ) == NULL )128 if( help_init( &(global.help), global.helpfile ) == NULL ) 129 129 log_message( LOGLVL_WARNING, "Error opening helpfile %s.", HELP_FILE ); 130 130 131 131 b_main_run(); 132 133 /* Mainly good for restarting, to make sure we close the help.txt fd. */134 help_free( &global.help );135 132 136 133 if( global.restart )
Note: See TracChangeset
for help on using the changeset viewer.