Changeset ec81221 in mainline for uspace/lib/hound/src/client.c
- Timestamp:
- 2013-03-24T14:09:11Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2ba4d45
- Parents:
- 7294b5b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/hound/src/client.c
r7294b5b rec81221 160 160 { 161 161 assert(hound); 162 if (hound->record) 163 return hound_service_connect_source_sink( 162 assert(target); 163 164 const char **tgt = NULL; 165 size_t count = 1; 166 int ret = EOK; 167 if (str_cmp(target, HOUND_DEFAULT_TARGET) == 0) { 168 ret = hound_context_get_available_targets(hound, &tgt, &count); 169 if (ret != EOK) 170 return ret; 171 target = tgt[0]; 172 } 173 //TODO handle all-targets 174 175 if (hound->record) { 176 ret = hound_service_connect_source_sink( 164 177 hound->session, target, hound->name); 165 else166 ret urnhound_service_connect_source_sink(178 } else { 179 ret = hound_service_connect_source_sink( 167 180 hound->session, hound->name, target); 181 } 182 if (tgt) 183 free(tgt[0]); 184 free(tgt); 185 return ret; 168 186 } 169 187 … … 171 189 { 172 190 assert(hound); 173 if (hound->record) 191 assert(target); 192 if (hound->record) { 174 193 return hound_service_disconnect_source_sink( 175 194 hound->session, target, hound->name); 176 else195 } else { 177 196 return hound_service_disconnect_source_sink( 178 197 hound->session, hound->name, target); 198 } 179 199 } 180 200
Note:
See TracChangeset
for help on using the changeset viewer.