equal
deleted
inserted
replaced
37 static void clearCallbacks(flib_mapconn *conn) { |
37 static void clearCallbacks(flib_mapconn *conn) { |
38 conn->onSuccessCb = &noop_handleSuccess; |
38 conn->onSuccessCb = &noop_handleSuccess; |
39 conn->onFailureCb = &noop_handleFailure; |
39 conn->onFailureCb = &noop_handleFailure; |
40 } |
40 } |
41 |
41 |
42 static flib_vector *createConfigBuffer(flib_map *mapdesc) { |
42 static flib_vector *createConfigBuffer(const flib_map *mapdesc) { |
43 flib_vector *result = NULL; |
43 flib_vector *result = NULL; |
44 flib_vector *tempbuffer = flib_vector_create(); |
44 flib_vector *tempbuffer = flib_vector_create(); |
45 if(tempbuffer) { |
45 if(tempbuffer) { |
46 bool error = false; |
46 bool error = false; |
47 error |= flib_ipc_append_mapconf(tempbuffer, mapdesc, true); |
47 error |= flib_ipc_append_mapconf(tempbuffer, mapdesc, true); |
53 } |
53 } |
54 flib_vector_destroy(tempbuffer); |
54 flib_vector_destroy(tempbuffer); |
55 return result; |
55 return result; |
56 } |
56 } |
57 |
57 |
58 flib_mapconn *flib_mapconn_create(flib_map *mapdesc) { |
58 flib_mapconn *flib_mapconn_create(const flib_map *mapdesc) { |
59 flib_mapconn *result = NULL; |
59 flib_mapconn *result = NULL; |
60 flib_mapconn *tempConn = flib_calloc(1, sizeof(flib_mapconn)); |
60 flib_mapconn *tempConn = flib_calloc(1, sizeof(flib_mapconn)); |
61 if(tempConn) { |
61 if(tempConn) { |
62 tempConn->ipcBase = flib_ipcbase_create(); |
62 tempConn->ipcBase = flib_ipcbase_create(); |
63 tempConn->configBuffer = createConfigBuffer(mapdesc); |
63 tempConn->configBuffer = createConfigBuffer(mapdesc); |