Missing commit message. Contributed by must go in commit message and not
in subject.
On Thu, Dec 06, 2012 at 04:54:38PM +0100, Mohamed wrote:
>
> Signed-off-by: Ahmed ZRIBI <ahmed.zribi@pivasoftware.com>
> Signed-off-by: Mohamed <mohamed.kallel@pivasoftware.com>
> ---
> src/cwmp.c | 2 +-
> src/cwmp.h | 2 +-
> src/ubus.c | 5 ++++-
> 3 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/src/cwmp.c b/src/cwmp.c
> index 1bf9b2a..b75c762 100644
> --- a/src/cwmp.c
> +++ b/src/cwmp.c
> @@ -245,7 +245,7 @@ void cwmp_clear_events(void)
> pthread_mutex_unlock(&event_lock);
> }
>
> -void cwmp_add_notification(char *parameter, char *value)
> +void cwmp_add_notification(char *parameter, char *value, char *type)
> {
> char *c = NULL;
> external_get_action("notification", parameter, &c);
> diff --git a/src/cwmp.h b/src/cwmp.h
> index 5703db0..1d8afac 100644
> --- a/src/cwmp.h
> +++ b/src/cwmp.h
> @@ -52,7 +52,7 @@ void cwmp_add_event(int code, char *key);
> void cwmp_remove_event(int code);
> void cwmp_clear_events(void);
>
> -void cwmp_add_notification(char *parameter, char *value);
> +void cwmp_add_notification(char *parameter, char *value, char *type);
> void cwmp_clear_notifications(void);
>
> int cwmp_set_parameter_write_handler(char *name, char *value);
> diff --git a/src/ubus.c b/src/ubus.c
> index d5437f9..0fd1def 100644
> --- a/src/ubus.c
> +++ b/src/ubus.c
> @@ -38,12 +38,14 @@ static void ubus_freecwmpd_stop_callback(struct
> uloop_timeout *timeout)
> static enum notify {
> NOTIFY_PARAM,
> NOTIFY_VALUE,
> + NOTIFY_TYPE,
> __NOTIFY_MAX
> };
>
> static const struct blobmsg_policy notify_policy[] = {
> [NOTIFY_PARAM] = { .name = "parameter", .type = BLOBMSG_TYPE_STRING },
> [NOTIFY_VALUE] = { .name = "value", .type = BLOBMSG_TYPE_STRING },
> + [NOTIFY_TYPE] = { .name = "type", .type = BLOBMSG_TYPE_STRING },
> };
>
> static int
> @@ -66,7 +68,8 @@ freecwmpd_handle_notify(struct ubus_context *ctx, struct
> ubus_object *obj,
> "triggered ubus notification parameter %s\n",
> blobmsg_data(tb[NOTIFY_PARAM]));
> cwmp_add_notification(blobmsg_data(tb[NOTIFY_PARAM]),
> - blobmsg_data(tb[NOTIFY_VALUE]));
> + blobmsg_data(tb[NOTIFY_VALUE]),
> + tb[NOTIFY_TYPE]? blobmsg_data(tb[NOTIFY_TYPE]) : NULL);
Incorect indentation and missing spaces.
>
> return 0;
> }
> --
> 1.7.4.1
Luka
|