projects
/
NeonServV5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ab00680
)
fixed MYSQL_RES parsing
author
pk910
<philipp@zoelle1.de>
Sun, 14 Aug 2011 20:35:23 +0000
(22:35 +0200)
committer
pk910
<philipp@zoelle1.de>
Sun, 14 Aug 2011 20:35:23 +0000
(22:35 +0200)
bot_NeonServ.c
patch
|
blob
|
history
mysqlConn.c
patch
|
blob
|
history
diff --git
a/bot_NeonServ.c
b/bot_NeonServ.c
index 1ee7fe45930a75800d6b92f7acd87c7c15284ad4..60b5d87d1e4e84d09c028e80be49eade7c8752f5 100644
(file)
--- a/
bot_NeonServ.c
+++ b/
bot_NeonServ.c
@@
-57,10
+57,10
@@
static void start_bots() {
strcpy(user->ident, row[1]);
strcpy(user->realname, row[2]);
user->flags |= USERFLAG_ISBOT;
strcpy(user->ident, row[1]);
strcpy(user->realname, row[2]);
user->flags |= USERFLAG_ISBOT;
- client = create_socket(row[3],
*row[4]
, row[5], user);
- client->flags |= (
*row[6] == 1
? SOCKET_FLAG_PREFERRED : 0);
+ client = create_socket(row[3],
atoi(row[4])
, row[5], user);
+ client->flags |= (
strcmp(row[6], "0")
? SOCKET_FLAG_PREFERRED : 0);
client->botid = BOTID;
client->botid = BOTID;
- client->clientid =
*row[7]
;
+ client->clientid =
atoi(row[7])
;
connect_socket(client);
}
connect_socket(client);
}
diff --git
a/mysqlConn.c
b/mysqlConn.c
index 9f2ba7f6016a0e59de332fa454398d09842a8b9d..e62ef3f4b4e3f11583842f2d92d64c5fe4350cbb 100644
(file)
--- a/
mysqlConn.c
+++ b/
mysqlConn.c
@@
-41,12
+41,14
@@
void mysql_free() {
mysql_free_result(result->result);
free(result);
}
mysql_free_result(result->result);
free(result);
}
+ used_results = NULL;
struct escaped_string *escaped, *next_escaped;
for(escaped = escaped_strings; escaped; escaped = next_escaped) {
next_escaped = escaped->next;
free(escaped->string);
free(escaped);
}
struct escaped_string *escaped, *next_escaped;
for(escaped = escaped_strings; escaped; escaped = next_escaped) {
next_escaped = escaped->next;
free(escaped->string);
free(escaped);
}
+ escaped_strings = NULL
}
void init_mysql() {
}
void init_mysql() {