Commit 2e2b07ef authored by shahab SHARIATBAGHERI's avatar shahab SHARIATBAGHERI

push update load

parent 689eae92
...@@ -26,8 +26,9 @@ ...@@ -26,8 +26,9 @@
* \version 0.1 * \version 0.1
*/ */
#include<stdio.h> #include <stdio.h>
#include <time.h> #include <time.h>
#include <sys/stat.h>
#include "flexran_agent_common.h" #include "flexran_agent_common.h"
#include "flexran_agent_common_internal.h" #include "flexran_agent_common_internal.h"
...@@ -386,7 +387,7 @@ int flexran_agent_control_delegation(mid_t mod_id, const void *params, Protocol_ ...@@ -386,7 +387,7 @@ int flexran_agent_control_delegation(mid_t mod_id, const void *params, Protocol_
Protocol__FlexControlDelegation *control_delegation_msg = input->control_delegation_msg; Protocol__FlexControlDelegation *control_delegation_msg = input->control_delegation_msg;
// struct timespec vartime = timer_start(); // struct timespec vartime = timer_start();
int status;
//Write the payload lib into a file in the cache and load the lib //Write the payload lib into a file in the cache and load the lib
char lib_name[120]; char lib_name[120];
char target[512]; char target[512];
...@@ -394,6 +395,8 @@ int flexran_agent_control_delegation(mid_t mod_id, const void *params, Protocol_ ...@@ -394,6 +395,8 @@ int flexran_agent_control_delegation(mid_t mod_id, const void *params, Protocol_
strcpy(target, local_cache); strcpy(target, local_cache);
strcat(target, lib_name); strcat(target, lib_name);
status = mkdir(local_cache, S_IRWXU | S_IRWXG | S_IRWXO);
FILE *f; FILE *f;
f = fopen(target, "wb"); f = fopen(target, "wb");
fwrite(control_delegation_msg->payload.data, control_delegation_msg->payload.len, 1, f); fwrite(control_delegation_msg->payload.data, control_delegation_msg->payload.len, 1, f);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment