You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running with GDB i am getting error:
Program received signal SIGSEGV, Segmentation fault.
sdscatlen (s=0x0, t=t@entry=0x609950, len=len@entry=40)
at sds.c:239
239 size_t curlen = sdslen(s);
Running with GDB i am getting error:
Program received signal SIGSEGV, Segmentation fault.
sdscatlen (s=0x0, t=t@entry=0x609950, len=len@entry=40)
at sds.c:239
239 size_t curlen = sdslen(s);
My code is:
#include "redis_nb.h"
#define MAXCON 8192
#define MAXEVENTS 1024
#define DATASTORE_IP "10.129.28.54"
int pkt_sent = 0;
int port_nos = 6440;
//unordered_map <UeContext, string> ue_ctx;
//unordered_map <uint64_t, string> guti_ueid;
void SignalHandler(int signum) {
fflush(stdout);
}
struct Getcontext {
string key;
int send_sockid;
UeContext Context;
};
struct Getguti {
string key;
int send_sockid;
uint64_t value;
};
int write_stream(int conn_fd, uint8_t *buf, int len) {
int ptr;
int retval;
int written_bytes;
int remaining_bytes;
}
int make_socket_nb(int sfd) {
int flags, s;
}
void getCallbackContext(redisAsyncContext *c, void *r, void *privdata) {
redisAsyncCommand(c, (redisCallbackFn *) NULL, NULL, "EXEC");
redisReply *reply = (redisReply *) r;
int j, ret;
if (reply == NULL) return;
Getcontext *val1 = (Getcontext *) privdata;
string rep = reply->str;
Packet pkt1;
string cmd = "get_context";
pkt1.clear_pkt();
pkt1.append_item(cmd);
//pkt1.append_item(val1->send_sockid);
pkt1.append_item(val1->key);
pkt1.append_item(rep);
//pkt1.prepend_len();
//ue_ctx.erase((UeContext)rep);
ret = write_stream(val1->send_sockid, pkt1.data, pkt1.len); //sep25 //uncomment oct25
if (ret < 0) {
cout << "Error: getcallbackcontext_write" << endl;
exit(-1);
}
//pkt_sent++;
redisAsyncDisconnect(c); //sep20 //oct4
}
void getCallbackGuti(redisAsyncContext *c, void *r, void *privdata) {
redisAsyncCommand(c, (redisCallbackFn *) NULL, NULL, "EXEC");
redisReply *reply = (redisReply *) r;
int j, ret;
if (reply == NULL) return;
Getguti *val1 = (Getguti *) privdata;
string rep = reply->str;
Packet pkt1;
string cmd = "get_guti";
pkt1.clear_pkt();
pkt1.append_item(cmd);
//pkt1.append_item(val1->send_sockid);
pkt1.append_item(val1->key);
pkt1.append_item(rep);
//pkt1.prepend_len();
//guti_ueid.erase((uint64_t)rep);
ret = write_stream(val1->send_sockid, pkt1.data, pkt1.len); //sep25 //uncomment oct25
if (ret < 0) {
cout << "Error: getCallbackGuti_write" << endl;
exit(-1);
}
//pkt_sent++;
redisAsyncDisconnect(c); //sep20 //oct4
}
void setCallback1(redisAsyncContext *c, void *r, void *privdata) {
redisAsyncCommand(c, (redisCallbackFn *) NULL, NULL, "EXEC");
redisAsyncDisconnect(c);
}
void connectCallback(const redisAsyncContext *c, int status) {
if (status != REDIS_OK) {
printf("Error: %s\n", c->errstr);
return;
}
printf("Connected...\n");
}
void disconnectCallback(const redisAsyncContext *c, int status) {
if (status != REDIS_OK) {
printf("Error: %s\n", c->errstr);
return;
}
printf("Disconnected...\n");
}
int read_stream(int conn_fd, uint8_t *buf, int len) {
int ptr;
int retval;
int read_bytes;
int remaining_bytes;
}
int main(int argc, char **argv)
{
}
Getting error on redisAsyncCommand function.
The text was updated successfully, but these errors were encountered: