--- mqtt/src/pubmqtt.c 2012/06/26 13:43:59 1.2.2.12 +++ mqtt/src/pubmqtt.c 2012/06/29 14:26:39 1.2.2.13 @@ -471,7 +471,7 @@ mqtt_rtlm_read_topic(cfg_root_t *cfg, sqlite3 *sql, co /* calculate count of rows and allocate subscribe items */ while (sqlite3_step(stmt) == SQLITE_ROW) rowz++; - if (!(s = io_malloc((rowz + 1) * sizeof(mqtt_subscr_t)))) { + if (!(s = malloc((rowz + 1) * sizeof(mqtt_subscr_t)))) { mqtt_rtlm_log("Error:: System #%d - %s", errno, strerror(errno)); goto end; } else @@ -481,11 +481,11 @@ mqtt_rtlm_read_topic(cfg_root_t *cfg, sqlite3 *sql, co /* fill with data */ for (j = 0; j < rowz && sqlite3_step(stmt) == SQLITE_ROW; j++) { s[j].sub_ret = (char) sqlite3_column_int(stmt, 0); - s[j].sub_topic.msg_base = (u_char*) io_strdup((char*) sqlite3_column_text(stmt, 1)); + s[j].sub_topic.msg_base = (u_char*) strdup((char*) sqlite3_column_text(stmt, 1)); s[j].sub_topic.msg_len = strlen((char*) s[j].sub_topic.msg_base); AIT_SET_PTR(&v, (void*) sqlite3_column_blob(stmt, 2), sqlite3_column_bytes(stmt, 2)); s[j].sub_value.msg_len = AIT_LEN(&v); - s[j].sub_value.msg_base = (u_char*) io_malloc(s[j].sub_value.msg_len); + s[j].sub_value.msg_base = (u_char*) malloc(s[j].sub_value.msg_len); if (s[j].sub_value.msg_base) memcpy(s[j].sub_value.msg_base, AIT_GET_PTR(&v), s[j].sub_value.msg_len); } @@ -635,7 +635,7 @@ mqtt_rtlm_read_subscribe(cfg_root_t *cfg, sqlite3 *sql /* calculate count of rows and allocate subscribe items */ while (sqlite3_step(stmt) == SQLITE_ROW) rowz++; - if (!(s = io_malloc((rowz + 1) * sizeof(mqtt_subscr_t)))) { + if (!(s = malloc((rowz + 1) * sizeof(mqtt_subscr_t)))) { mqtt_rtlm_log("Error:: System #%d - %s", errno, strerror(errno)); goto end; } else @@ -645,7 +645,7 @@ mqtt_rtlm_read_subscribe(cfg_root_t *cfg, sqlite3 *sql /* fill with data */ for (j = 0; j < rowz && sqlite3_step(stmt) == SQLITE_ROW; j++) { s[j].sub_ret = (char) sqlite3_column_int(stmt, 0); - s[j].sub_topic.msg_base = (u_char*) io_strdup((char*) sqlite3_column_text(stmt, 1)); + s[j].sub_topic.msg_base = (u_char*) strdup((char*) sqlite3_column_text(stmt, 1)); s[j].sub_topic.msg_len = strlen((char*) s[j].sub_topic.msg_base); s[j].sub_value.msg_base = NULL; s[j].sub_value.msg_len = 0;