Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gattlib write char by uuid #35

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Gattlib write char by uuid #35

wants to merge 5 commits into from

Conversation

mweal-ed
Copy link
Contributor

gattlib_write_char_by_uuid writes the incorrect buffer size. This changes gattlib_write_char_by_uuid to use buffer_len rather than sizeof(buffer) when writing so it writes the correct buffer size.

@oliviermartin
Copy link
Contributor

May be this pull-request should be merged into #34?

@mweal-ed
Copy link
Contributor Author

mweal-ed commented Jul 18, 2017

This is a separate unrelated commit. It is a one line change to bluez/gattlib_read_write.c:

@@ -222,7 +222,7 @@ int gattlib_write_char_by_uuid(gatt_connection_t* connection, uuid_t* uuid, cons
  		return ret;
  	}
  
 -	return gattlib_write_char_by_handle(connection, handle, buffer, sizeof(buffer));
 +	return gattlib_write_char_by_handle(connection, handle, buffer, buffer_len);
  }
  
  int gattlib_notification_start(gatt_connection_t* connection, const uuid_t* uuid) {

I am relatively new to this part of git and do not know how to separate it yet. I will look into it in the next few days.

@mweal-ed mweal-ed closed this Jul 19, 2017
@mweal-ed mweal-ed deleted the gattlib_write_char_by_uuid branch July 19, 2017 20:12
@mweal-ed mweal-ed restored the gattlib_write_char_by_uuid branch July 19, 2017 20:29
@mweal-ed mweal-ed reopened this Jul 19, 2017
oliviermartin added a commit that referenced this pull request Mar 5, 2019
oliviermartin added a commit that referenced this pull request Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants