Skip to content

Commit edd317b

Browse files
Update Diffusion Examples to 6.11.1
1 parent 92a8932 commit edd317b

File tree

15 files changed

+46
-46
lines changed

15 files changed

+46
-46
lines changed

c/features/authentication_control/auth-service.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ static int on_authenticator_authenticate(
158158
return HANDLER_SUCCESS;
159159
}
160160

161-
char *password = malloc(credentials->data->len + 1);
161+
char *password = calloc(credentials->data->len + 1, sizeof(char));
162162
memmove(password, credentials->data->data, credentials->data->len);
163163
password[credentials->data->len] = '\0';
164164

c/features/topic_update/topic-update-with-value-comparison-constraint.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ static int on_error(
7979
// Handler for value stream
8080
static int on_value(
8181
const char* topic_path,
82-
const TOPIC_SPECIFICATION_T *const specification,
82+
const TOPIC_SPECIFICATION_T * specification,
8383
const DIFFUSION_DATATYPE datatype,
84-
const DIFFUSION_VALUE_T *const old_value,
85-
const DIFFUSION_VALUE_T *const new_value,
84+
const DIFFUSION_VALUE_T * old_value,
85+
const DIFFUSION_VALUE_T * new_value,
8686
void *context)
8787
{
8888
DIFFUSION_API_ERROR api_error;
@@ -196,7 +196,7 @@ int main(int argc, char** argv)
196196

197197
printf("Loop has started.\n");
198198
while(time(NULL) < end_time) {
199-
DIFFUSION_UPDATE_CONSTRAINT_VALUE_T *constraint_value =
199+
DIFFUSION_UPDATE_CONSTRAINT_VALUE_T * constraint_value =
200200
diffusion_update_constraint_value_from_int64(comparison_value);
201201

202202
DIFFUSION_TOPIC_UPDATE_CONSTRAINT_T *update_constraint =

c/features/topic_views/topic-views.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ static int on_topic_update(void *context)
113113

114114
static int on_subscription(
115115
const char *const topic_path,
116-
const TOPIC_SPECIFICATION_T *const specification,
116+
const TOPIC_SPECIFICATION_T * specification,
117117
void *context)
118118
{
119119
printf("Subscribed to \"%s\"\n", topic_path);
@@ -123,10 +123,10 @@ static int on_subscription(
123123

124124
static int on_value(
125125
const char *const topic_path,
126-
const TOPIC_SPECIFICATION_T *const specification,
126+
const TOPIC_SPECIFICATION_T * specification,
127127
DIFFUSION_DATATYPE datatype,
128-
const DIFFUSION_VALUE_T *const old_value,
129-
const DIFFUSION_VALUE_T *const new_value,
128+
const DIFFUSION_VALUE_T * old_value,
129+
const DIFFUSION_VALUE_T * new_value,
130130
void *context)
131131
{
132132
char *result;

c/features/topics/binary-topics.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ static int on_topic_add_discard(SESSION_T *session, void *context)
8080

8181
static int on_subscription(
8282
const char *const topic_path,
83-
const TOPIC_SPECIFICATION_T *const specification,
83+
const TOPIC_SPECIFICATION_T * specification,
8484
void *context)
8585
{
8686
printf("Subscribed to topic: %s\n", topic_path);
@@ -90,7 +90,7 @@ static int on_subscription(
9090

9191
static int on_unsubscription(
9292
const char *const topic_path,
93-
const TOPIC_SPECIFICATION_T *const specification,
93+
const TOPIC_SPECIFICATION_T * specification,
9494
NOTIFY_UNSUBSCRIPTION_REASON_T reason,
9595
void *context)
9696
{
@@ -101,10 +101,10 @@ static int on_unsubscription(
101101

102102
static int on_value(
103103
const char *const topic_path,
104-
const TOPIC_SPECIFICATION_T *const specification,
104+
const TOPIC_SPECIFICATION_T * specification,
105105
DIFFUSION_DATATYPE datatype,
106-
const DIFFUSION_VALUE_T *const old_value,
107-
const DIFFUSION_VALUE_T *const new_value,
106+
const DIFFUSION_VALUE_T * old_value,
107+
const DIFFUSION_VALUE_T * new_value,
108108
void *context)
109109
{
110110
if(old_value) {

c/features/topics/double-topics.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ static int on_topic_add_discard(
7979

8080
static int on_subscription(
8181
const char *const topic_path,
82-
const TOPIC_SPECIFICATION_T *const specification,
82+
const TOPIC_SPECIFICATION_T * specification,
8383
void *context)
8484
{
8585
printf("Subscribed to topic: %s\n", topic_path);
@@ -89,7 +89,7 @@ static int on_subscription(
8989

9090
static int on_unsubscription(
9191
const char *const topic_path,
92-
const TOPIC_SPECIFICATION_T *const specification,
92+
const TOPIC_SPECIFICATION_T * specification,
9393
NOTIFY_UNSUBSCRIPTION_REASON_T reason,
9494
void *context)
9595
{
@@ -100,10 +100,10 @@ static int on_unsubscription(
100100

101101
static int on_value(
102102
const char *const topic_path,
103-
const TOPIC_SPECIFICATION_T *const specification,
103+
const TOPIC_SPECIFICATION_T * specification,
104104
DIFFUSION_DATATYPE datatype,
105-
const DIFFUSION_VALUE_T *const old_value,
106-
const DIFFUSION_VALUE_T *const new_value,
105+
const DIFFUSION_VALUE_T * old_value,
106+
const DIFFUSION_VALUE_T * new_value,
107107
void *context)
108108
{
109109
if(old_value) {

c/features/topics/int64-topics.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ static int on_topic_add_discard(SESSION_T *session, void *context)
7777

7878
static int on_subscription(
7979
const char *const topic_path,
80-
const TOPIC_SPECIFICATION_T *const specification,
80+
const TOPIC_SPECIFICATION_T * specification,
8181
void *context)
8282
{
8383
printf("Subscribed to topic: %s\n", topic_path);
@@ -87,7 +87,7 @@ static int on_subscription(
8787

8888
static int on_unsubscription(
8989
const char *const topic_path,
90-
const TOPIC_SPECIFICATION_T *const specification,
90+
const TOPIC_SPECIFICATION_T * specification,
9191
NOTIFY_UNSUBSCRIPTION_REASON_T reason,
9292
void *context)
9393
{
@@ -98,10 +98,10 @@ static int on_unsubscription(
9898

9999
static int on_value(
100100
const char *const topic_path,
101-
const TOPIC_SPECIFICATION_T *const specification,
101+
const TOPIC_SPECIFICATION_T * specification,
102102
DIFFUSION_DATATYPE datatype,
103-
const DIFFUSION_VALUE_T *const old_value,
104-
const DIFFUSION_VALUE_T *const new_value,
103+
const DIFFUSION_VALUE_T * old_value,
104+
const DIFFUSION_VALUE_T * new_value,
105105
void *context)
106106
{
107107
if(old_value) {

c/features/topics/recordv2-topics.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ static int on_topic_add_discard(
7979

8080
static int on_subscription(
8181
const char *const topic_path,
82-
const TOPIC_SPECIFICATION_T *const specification,
82+
const TOPIC_SPECIFICATION_T * specification,
8383
void *context)
8484
{
8585
printf("Subscribed to topic: %s\n", topic_path);
@@ -89,7 +89,7 @@ static int on_subscription(
8989

9090
static int on_unsubscription(
9191
const char *const topic_path,
92-
const TOPIC_SPECIFICATION_T *const specification,
92+
const TOPIC_SPECIFICATION_T * specification,
9393
NOTIFY_UNSUBSCRIPTION_REASON_T reason,
9494
void *context)
9595
{
@@ -100,10 +100,10 @@ static int on_unsubscription(
100100

101101
static int on_value(
102102
const char *const topic_path,
103-
const TOPIC_SPECIFICATION_T *const specification,
103+
const TOPIC_SPECIFICATION_T * specification,
104104
DIFFUSION_DATATYPE datatype,
105-
const DIFFUSION_VALUE_T *const old_value,
106-
const DIFFUSION_VALUE_T *const new_value,
105+
const DIFFUSION_VALUE_T * old_value,
106+
const DIFFUSION_VALUE_T * new_value,
107107
void *context)
108108
{
109109
if(old_value) {

c/features/topics/string-topics.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ static int on_topic_add_discard(
7979

8080
static int on_subscription(
8181
const char *const topic_path,
82-
const TOPIC_SPECIFICATION_T *const specification,
82+
const TOPIC_SPECIFICATION_T * specification,
8383
void *context)
8484
{
8585
printf("Subscribed to topic: %s\n", topic_path);
@@ -89,7 +89,7 @@ static int on_subscription(
8989

9090
static int on_unsubscription(
9191
const char *const topic_path,
92-
const TOPIC_SPECIFICATION_T *const specification,
92+
const TOPIC_SPECIFICATION_T * specification,
9393
NOTIFY_UNSUBSCRIPTION_REASON_T reason,
9494
void *context)
9595
{
@@ -100,10 +100,10 @@ static int on_unsubscription(
100100

101101
static int on_value(
102102
const char *const topic_path,
103-
const TOPIC_SPECIFICATION_T *const specification,
103+
const TOPIC_SPECIFICATION_T * specification,
104104
DIFFUSION_DATATYPE datatype,
105-
const DIFFUSION_VALUE_T *const old_value,
106-
const DIFFUSION_VALUE_T *const new_value,
105+
const DIFFUSION_VALUE_T * old_value,
106+
const DIFFUSION_VALUE_T * new_value,
107107
void *context)
108108
{
109109
if(old_value) {

c/features/topics/subscribe.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ static int on_unsubscription(const char* topic_path,
5959
}
6060

6161
static int on_value(const char* topic_path,
62-
const TOPIC_SPECIFICATION_T *const specification,
62+
const TOPIC_SPECIFICATION_T * specification,
6363
const DIFFUSION_DATATYPE datatype,
64-
const DIFFUSION_VALUE_T *const old_value,
65-
const DIFFUSION_VALUE_T *const new_value,
64+
const DIFFUSION_VALUE_T * old_value,
65+
const DIFFUSION_VALUE_T * new_value,
6666
void *context)
6767
{
6868
DIFFUSION_API_ERROR api_error;
@@ -81,7 +81,7 @@ static int on_value(const char* topic_path,
8181
return HANDLER_SUCCESS;
8282
}
8383

84-
static void on_close()
84+
static void on_close()
8585
{
8686
printf("Value stream closed\n");
8787
}

dotnet/source/examples/Runner/Runner.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFrameworks>net461;netcoreapp2.0</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;net461;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
55
<RootNamespace>PushTechnology.ClientInterface.Example</RootNamespace>
66
</PropertyGroup>
77

0 commit comments

Comments
 (0)