diff --git a/examples/configmap/main.c b/examples/configmap/main.c index 0c3f431..08776eb 100644 --- a/examples/configmap/main.c +++ b/examples/configmap/main.c @@ -122,6 +122,7 @@ void delete_configmap(apiClient_t * apiClient, char *name, char *namespace_) NULL, // char *pretty NULL, // char *dryRun NULL, // int *gracePeriodSeconds + NULL, // int *ignoreStoreReadErrorWithClusterBreakingPotential NULL, // int *orphanDependents NULL, // char *propagationPolicy NULL // v1_delete_options_t *body diff --git a/examples/delete_pod/main.c b/examples/delete_pod/main.c index 026e880..369c37b 100644 --- a/examples/delete_pod/main.c +++ b/examples/delete_pod/main.c @@ -13,6 +13,7 @@ void delete_a_pod(apiClient_t * apiClient) NULL, // char *pretty NULL, // char *dryRun NULL, // int *gracePeriodSeconds + NULL, // int* ignoreStoreReadErrorWithClusterBreakingPotential NULL, // int *orphanDependents NULL, // char *propagationPolicy NULL // v1_delete_options_t *body diff --git a/kubernetes/config/authn_plugin/authn_plugin_util.c b/kubernetes/config/authn_plugin/authn_plugin_util.c index dbf67d9..ee4ed7c 100644 --- a/kubernetes/config/authn_plugin/authn_plugin_util.c +++ b/kubernetes/config/authn_plugin/authn_plugin_util.c @@ -11,7 +11,11 @@ int shc_request(char **p_http_response, int *p_http_response_length, char *type, fprintf(stderr, "%s: Cannot create http client. [%s].\n", fname, strerror(errno)); return -1; } - apiClient_invoke(http_client, NULL, NULL, NULL, NULL, NULL, contentType, post_data, strlen(post_data), type); + size_t len = 0; + if (post_data != NULL) { + len = strlen(post_data); + } + apiClient_invoke(http_client, NULL, NULL, NULL, NULL, NULL, contentType, post_data, len, type); int rc = http_client->response_code; switch (rc) { diff --git a/kubernetes/src/generic.c b/kubernetes/src/generic.c index e6455ed..f03193b 100644 --- a/kubernetes/src/generic.c +++ b/kubernetes/src/generic.c @@ -60,7 +60,11 @@ void makeResourcePath(char* path, genericClient_t *client, const char* name) { char* callInternal(genericClient_t *client, const char *path, list_t *queryParameters, list_t *headerParameters, list_t *formParameters, list_t *headerType, list_t *contentType, const char *body, const char *method) { - apiClient_invoke(client->client, path, queryParameters, headerParameters, formParameters, headerType, contentType, body, strlen(body), method); + size_t len = 0; + if (body != NULL) { + len = strlen(body); + } + apiClient_invoke(client->client, path, queryParameters, headerParameters, formParameters, headerType, contentType, body, len, method); if (client->client->response_code == 401) { return NULL;